/* Copyright 203-2115 AtomWare Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * The flowing information must be keep 
 * TestTask.java
 * testSuit
 * 2013-6-7下午3:17:31
 * @author 屈甲康
 * QQ285799123
 * mailto:qujiakang@gmail.com
 */

package org.jackysoft.ant.taskdef;

import java.io.File;
import java.util.Enumeration;
import java.util.Hashtable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Target;
import org.apache.tools.ant.Task;

public class CopyResourcesTask extends Task {
	static final Log logger = LogFactory.getLog(CopyResourcesTask.class);
	private String to = "";
	
	@Override
	public void execute() throws BuildException {

		Target tar = this.getOwningTarget();
	
		Enumeration<String> deps = tar.getDependencies();
		Hashtable<String, Target> targets = tar.getProject().getTargets();
        String cls = tar.getProject().getProperty("buildclasses");
		File  clsdir = new File(cls);	
		while (deps.hasMoreElements()) {
			String key = deps.nextElement();
			Target deptart = targets.get(key);
			String base = deptart.getProject().getProperty("buildclasses");
			File basedir = new File(base);
		    
			
		}
		super.execute();
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

}
